go.mod: go get github.com/zclconf/go-cty@v1.11.0 #31675
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a possible panic in what Terraform calls the "flatten" function in situations where a user passes in a null value of a sequence type. The function will now treat that the same as a null value of any other type.
This also includes some other changes that would benefit Terraform:
cty
: Improved performance when comparing nonzero numbers to zero, by performing a relatively-cheap sign check on both numbers before falling back on the more expensive general equality implementation. (#125)convert
: Unify will no longer panic when asked to find a common base type for a tuple type and a list of unknown element type, and will instead just signal that such a unification is not possible. (#126)Also notable is that this new release of
cty
now requires Go 1.18 or later. That's okay for backport into Terraform v1.2, since that release already uses Go 1.18, but this would not be backportable to older Terraform CLI releases. Our backport policy doesn't typically require us to go back further than one minor release anyway (aside from exceptional cases such as security advisories) and so I think this is a moot point, but I mention it for completeness.Fixes #31376.